package com.boatAnchorAssistant.service.repository.impl;

import com.boatAnchorAssistant.pojo.entity.Alarm;
import com.boatAnchorAssistant.pojo.vo.alarm.GetAlarmChartListVo;
import com.boatAnchorAssistant.service.mapper.AlarmMapper;
import com.boatAnchorAssistant.service.repository.in.AlarmRepository;
import nirvana.core.repository.Repository;
import org.springframework.stereotype.Service;
    import com.boatAnchorAssistant.pojo.dto.alarm.*;
    import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

/**
* 【描 述】：
* 【环 境】：J2SE
* 【详 细】：
*
*/
@Service
public class AlarmRepositoryImpl extends Repository< AlarmMapper , Alarm> implements AlarmRepository {

private final AlarmMapper mapper;

public AlarmRepositoryImpl(AlarmMapper mapper) {
this.mapper = mapper;
}

    /**
    * 搜索报警列表
    * @param dto
    * @return
    */
    @Override
    public Page< Alarm > selectAlarm(SelectAlarmDto dto){

    return mapper.selectAlarm(dto);
    }

    @Override
    public List<GetAlarmChartListVo> getAlarmChartList(GetAlarmChartListDto dto) {
        return mapper.getAlarmChartList(dto);
    }

}